package org.wangchaocheng.simpleadmin.statemachine;

import com.alibaba.cola.statemachine.Condition;
import org.springframework.stereotype.Service;


@Service
public class ConditionService {

    /**
     * 初始化状态流转到下载原始包状态的条件
     * @return {@link Condition}<{@link StateMachineContext}> 状态机状态转换条件
     */
    public Condition<StateMachineContext> init2DownloadCondition() {
        return context -> context.getTaskId().equals("task1");
    }
}
